package com.sc.commons.base.utils.except;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author
 */
@Data
public class ScException extends  RuntimeException {

    private Integer code;
    private String message;

    private ScException(){}

    public ScException(Integer code, String message){
        super(message);
        this.code = code;
        this.message = message;
    };

    public ScException(Integer code, String message, Throwable cause){
        super(message, cause);
        this.code = code;
        this.message = message;
    };

    public ScException(Integer code,Throwable cause) {
        super(cause);
        this.message = cause.getMessage();
    }

}
